package com.xingkeduo.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import javax.annotation.Resource;

@Component
public class ConfigInterector extends WebMvcConfigurerAdapter {
    @Resource
    private WechatFilter wechatFilter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(wechatFilter).addPathPatterns("/**");
//        registry.addInterceptor(wechatFilter)
////                    .addPathPatterns("/**/wechat/ftl/agent_regist/**")
////                    .addPathPatterns("/**/wechat/agent/v1/**")
////                    .addPathPatterns("/**/wechat/customer/v1/**")
//
//                    .addPathPatterns("/apartment/wechat/ftl/**");
    }
}
